import { ModelStateEnum } from './monitor'

/**
 * @title 部署状态
 * @description
 */
enum DeployStateEnums {
    RUNNING = 'running',
    STOP = 'stop',
}

/**
 * @title 训练状态
 * @description
 */
enum TrainningStateEnums {
    TRAINNING = 'trainning',
    ERROR = 'error',
    STOP = 'stop',
}

/**
 * @title 模型应用场景
 * @description
 */
enum ModelApplicationSceneEnums {
    SCENE_CLASSIFICATION = 'scene_classification',
    OBJECT_DETECTION = 'object_detetion',
    CHANGE_DETECTION = 'change_detection',
}

/**
 * @title 模型检索标签
 * @description
 */
interface IModelTag {
    title: string
    id: string
}

/**
 * @title AI模型
 * @description
 */
interface IAIModel {
    check_type: string
    created_time: string
    id: string
    model_name: string
    model_path: string
    model_type: IModelType
}

// 模型监测类型
type IModelType = '目标识别' | '变化检测'

/**
 * @title 模型训练日志
 * @description
 */
interface ITrainningModelLog {
    logID: string
    content: string
    createDate: string
    relateModelID: IAIModel['id']
}

/**
 * @description 监测配置
 */
interface IMonitorSet {
    status: ModelStateEnum
    details: {
        name: string
        type: IModelType
        check_type: string
        model_path: IAIModel['model_path']
        id?: IAIModel['id']
    }
}

export type {
    // interface
    IAIModel,
    IModelType,
    ITrainningModelLog,
    IModelTag,
    IMonitorSet,
    // enums
    DeployStateEnums,
    TrainningStateEnums,
    ModelApplicationSceneEnums,
}
